package com.oscarmovie.service;

import java.util.List;

import com.oscarmovie.dao.PersonDao;
import com.oscarmovie.model.Paging;
import com.oscarmovie.model.Person;

public class PersonServiceImpl implements PersonService{
	private PersonDao personDao;

	public void setPersonDao(PersonDao personDao) {
		this.personDao = personDao;
	}

	public PersonDao getPersonDao() {
		return personDao;
	}

	
	public void save(Person person) {
		personDao.save(person);
	}

	
	public Person load(int id) {
		Person person =  personDao.load(id);
		return person;
	}

	
	public List<Person> loadAll() {
		return personDao.loadAll();
	}
	
	
	public List<Person> list(Paging paging) {
		return personDao.list(paging);
	}

	
	public List<Person> list(Paging paging, Person person) {
		return personDao.loadAll(paging,person);
	}

	
	public List<Person> loadAll(Person person) {
		return personDao.loadAll(person);
	}

	
	public List<Person> loadMostAwarded(int count) {
		return personDao.loadMostAwarded(count);
	}

	
	public List<Person> loadMostScore(int count) {
		return personDao.loadMostScore(count);
	}

	
	public List<Person> loadMostFavorite(int count) {
		return personDao.loadMostFavorite(count);
	}
}
